package su.jet.irc.client.service;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

import su.jet.common.irc.protocol.Session;

public class ConnectionService {

	private final String IP = "localhost";
	private final int SERVERS_PORT = 10001;
	private final int READERS_PORT = 50001;
	
	public Session getConnectionWithServer() throws UnknownHostException, IOException {
		return new Session(new Socket(InetAddress.getByName(IP), SERVERS_PORT));
	}

	public Session getConnectionWithReader() throws UnknownHostException, IOException {
		return  new Session(new Socket("localhost", READERS_PORT));
	}

}
